package com.qf.commons.web.aop;

/**
 * description: 用户的登录凭证信息
 * author: Ken
 * 公众号：Java架构栈
 */
public class UserInfo {

    private static ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    public static void setUid(Long uid) {
        threadLocal.set(uid);
    }

    public static Long getUid(){
        return threadLocal.get();
    }

    public static void clean(){
        threadLocal.remove();
    }
}
